home *** CD-ROM | disk | FTP | other *** search
- Path: news.xnet.com!news-admin
- From: kd9fb@xnet.com (Peter Mikalajunas)
- Newsgroups: comp.lang.c
- Subject: Re: [Q] functions returning structures
- Date: Thu, 07 Mar 1996 05:11:08 GMT
- Organization: XNet - A Full Service Internet Provider - (708) 983-6064
- Message-ID: <4hlqtb$6un@flood.xnet.com>
- References: <4hasjj$opf@decaxp.harvard.edu> <4hcn9u$9fo@inet-nntp-gw-1.us.oracle.com>
- NNTP-Posting-Host: monsoon.xnet.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- wkaufman@wkaufman.us.oracle.com (William Kaufman) wrote:
- >In article <4hasjj$opf@decaxp.harvard.edu> martino@course2.harvard.edu (Carlo Martino) writes:
-
- >] I have been programming in
- >] C for upwards of 6 years, and only recently did I hear something to the effect
- >] that structures returned by functions have a tendency to be corrupted.
-
- > I've never seen that happen on a compiler that supported structure
- >passing. Maybe the structure wasn't defined or function declared
- >properly: try turning your compiler's warnings all the way up--maybe
- >there wasn't a structure definition and the compiler pretended it was an
- >int,...
-
- I have seen compilers that insist on padding structures. Usually, if
- they are well behaved they will warn of the fact. DEC C comes
- to mind in this regard. Take a good look at the man page to see
- if there is switch that will force it to either warn you or not use
- such behaviour.
-
-
- kd9fb@xnet.com
- http://www.xnet.com/~kd9fb
-
-